#ifndef CARD_H
#define CARD_H
#include <QVector>


class Card
{
public:
    //花色
    // 定义扑克牌花色的枚举
    enum CardSuit {
        Suit_Begin,
        Diamonds,  // 方块
        Clubs,     // 梅花
        Hearts,    // 红心
        Spades ,     // 黑桃
        Suit_End
    };

    //点数

    // 定义扑克牌点数的枚举
    enum CardPoint {
        Card_Begin,
        Three,
        Four,
        Five,
        Six,
        Seven,
        Eight,
        Nine,
        Ten,
        Jack,
        Queen,
        King,
        Ace  ,
        Two ,
        Card_SJ,    // small joker
        Card_BJ,     // big joker
        Card_End
    };
    void setPoint(CardPoint point);
    void setSuit(CardSuit Suit);
    CardPoint point() const;
    CardSuit  suit() const;

  Card();
  Card(CardPoint point, CardSuit suit);
private:
    CardPoint m_point;
    CardSuit m_suit;

};
// 对象比较
bool lessSort(const Card& c1, const Card& c2);
bool greaterSort(const Card& c1, const Card& c2);
bool operator <(const Card& c1, const Card& c2);

// 操作符重载 (==)
bool operator ==(const Card& left, const Card& right);

// 重写全局函数 qHash
uint qHash(const Card& card);

// 定义类型的别名
using CardList = QVector<Card>;
#endif // CARD_H
